#!/bin/bash

reboot_ip=$1

ssh-keygen -t rsa
ssh-copy-id root@$reboot_ip

for num in $(seq -w 100); do
sleep 180
echo "===== run $num==="
ssh root@$reboot_ip "echo '=======$num======' >> no_login_reboot_100.txt; dmesg >> no_login_reboot_100.txt; reboot"
done